package com.scau.hwadee.examination.service.impl;

import com.scau.hwadee.examination.entity.Majororientation;
import com.scau.hwadee.examination.mapper.MajororientationMapper;
import com.scau.hwadee.examination.service.MajorOrientationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: wrh
 * @Date: 2019/8/1 17:16
 */
@Service
public class MajorOrientationServiceImpl implements MajorOrientationService {
    @Autowired
    private MajororientationMapper majororientationMapper;


    @Override
    public int addMajororientation(Majororientation record) {
        int cnt=majororientationMapper.insertSelective(record);
        return cnt;
    }

    @Override
    public int UpdateMajororientation(Majororientation record) {
        int cnt=majororientationMapper.updateByPrimaryKeySelective(record);
        return cnt;
    }

    @Override
    public List<Majororientation> getMajororientationByMajor(String mjId) {
        return majororientationMapper.selectAllByMajor(mjId);
    }

    @Override
    public int deleteMajororientation(String mrId) {
        return 0;
    }

}

